/*
 * @Description: gomall
 * @Author: ylf
 * @Date: 2024-10-17 17:18:20
 * @LastEditTime: 2025-06-28 09:30:36
 * @LastEditors: ylf
 * @FilePath: \ltool\pkg\util\string.go
 */
package util

import "encoding/json"

func ConvertToString(v interface{}) (str string) {
	if v == nil {
		return NULL
	}
	var (
		bs  []byte
		err error
	)
	if bs, err = json.Marshal(v); err != nil {
		return NULL
	}
	str = string(bs)
	return
}
